package com.knight.demo.service.impl;

import com.knight.demo.service.StudentService;
import com.knight.demo.service.TestService;
import com.knight.spring.framework.annotation.KnightAutowired;
import com.knight.spring.framework.annotation.KnightService;

@KnightService(value = "studentService")
public class StudentServiceImpl implements StudentService {

    @KnightAutowired(value = "testService")
    private TestService testService;

    public TestService getTestService() {
        return testService;
    }

    @Override
    public String getStudentName(String studentId) {
        return "zhangsan";
    }

    @Override
    public String add(String name, String addr) {
        throw new RuntimeException("故意抛出异常");
    }
}
